package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.DistributionBalanceDetailDO;
import com.iotechn.unimall.data.dto.DistributionOrderDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: rize
 * Date: 2019/11/28
 * Time: 12:40
 */
public interface DistributionBalanceDetailMapper extends BaseMapper<DistributionBalanceDetailDO> {

    /**
     * 获取分销用户最后一条明细
     * @param distribution
     * @return
     */
    public DistributionBalanceDetailDO getDistributionUserLastForUpdate(Long distribution);

    public List<DistributionOrderDTO> getDistributionOrder(@Param("offset") Integer offset, @Param("limit") Integer limit,@Param("distributionId") Long distributionId);

}
